package top.heliming.leyou.userservice.bean;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;

/**
 * description: //TODO
 *
 * @author: heliming
 * @date:2019/05/22 上午 1:49
 */
@Data
@Table(name = "l_user")
public class User implements Serializable {

  //主键自动驼峰映射
  private static final long serialVersionUID = 1L;

  @Id//主键ID 表中字段 id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;
  @Column(name = "id_no")
  private String idNo;
  // 用户名
  @Column(name = "user_name")
  private String userName;
  // 密码
  @Column(name = "pass_word")
  private String passWord;
  // 姓名
  private String name;
  // 年龄
  private Integer age;
  // 性别，1男性，2女性
  private Integer sex;
  // 出生日期
  private Date birthday;
  // 创建时间
  private Date created;
  // 更新时间
  private Date updated;
  // 备注
  private String note;

  @Override
  public String toString() {
    return "User{" +
        "id=" + id +
        ", idNo='" + idNo + '\'' +
        ", userName='" + userName + '\'' +
        ", passWord='" + passWord + '\'' +
        ", name='" + name + '\'' +
        ", age=" + age +
        ", sex=" + sex +
        ", birthday=" + birthday +
        ", created=" + created +
        ", updated=" + updated +
        ", note='" + note + '\'' +
        '}';
  }
}